<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui" 
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Provisioning: Customer Registration</title>
    </h:head>
    <h:body>
        <div style="text-align: center;">
            <p:panel header="Registration Form" style="width: 350px; display:inline-block; text-align: left;">
                <h:form id="registrationForm">
                    <h:panelGrid columns="2" cellpadding="2">
                        <h:outputLabel value="Login"/>
                        <h:inputText id="login" label="login" value="#{userProfileBean.login}" required="true"> 
                            <f:validateRegex pattern="([A-Za-z_.0-9-]{4,20})" for="#{userProfileBean.login}"/>
                        </h:inputText>
                        <h:outputLabel value="Password"/>
                        <h:inputSecret id="password" label="password" value="#{userProfileBean.password}" required="true"/>
                        <h:outputLabel value="Full Name"/>
                        <h:inputText id="fullname" label="fullname" value="#{userProfileBean.fullName}" required="true"/> 
                        <h:commandButton type="submit" value="Signup" action="#{userSessionBean.signUp(userProfileBean)}"/>
                    </h:panelGrid>
                </h:form>     
            </p:panel>
            <h:messages style="text-align: left; color: red;"></h:messages>
        </div>
    </h:body>
</html>
